package com.zzy.test;

import java.awt.*;
import java.net.URI;

public class UserIE {
    public void sendGetRequest(String url) {
        if ((url != null) && (Desktop.isDesktopSupported())) {
            try {
                URI uri = URI.create(url);
                Desktop dp = Desktop.getDesktop();
                if (dp.isSupported(Desktop.Action.BROWSE)) {
                    dp.browse(uri);
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    public static void main(String[] args) throws Exception {
        new UserIE().sendGetRequest("www.baidu.com");
    }
}
